/*
 * Copyright (C) 2008-2011 CBDP Consortium
 * 
 * All rights reserved.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.
 * 
 * This software consists of contributions made by many individuals, 
 * listed below:
 *
 * Author: 	Xabier Laiseca <xabier.laiseca@deusto.es>
 * 			David Ausín <david.ausin@deusto.es>
 */
package cbdp.server.contextreasoner.model;

import cbdp.server.contextreasoner.model.exceptions.InvalidDatatypeException;

/**
 * Represents a literal property of the ontology.
 * @author Xabier Laiseca (University of Deusto)
 *
 */
public interface PrimitiveDatatypeProperty extends GenericProperty
{
	/**
	 * Returns the <code>boolean</code> value of the property.
	 * @return the <code>boolean</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>boolean</code>.
	 */
	public boolean getBooleanValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>char</code> value of the property.
	 * @return the <code>char</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>char</code>.
	 */
	public char getCharValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>double</code> value of the property.
	 * @return the <code>double</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>double</code>.
	 */
	public double getDoubleValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>float</code> value of the property.
	 * @return the <code>float</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>float</code>.
	 */
	public float getFloatValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>int</code> value of the property.
	 * @return the <code>int</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>int</code>.
	 */
	public int getIntValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>long</code> value of the property.
	 * @return the <code>long</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>long</code>.
	 */
	public long getLongValue() throws InvalidDatatypeException;
	
	/**
	 * Returns the <code>String</code> value of the property.
	 * @return the <code>String</code> value of the property.
	 * @throws InvalidDatatypeException thrown when the value of the property can not be casted to <code>String</code>.
	 */
	public String getStringValue() throws InvalidDatatypeException;
	
	
	public void setValue(final boolean value) throws InvalidDatatypeException;
	
	public void setValue(final char value) throws InvalidDatatypeException;
	
	public void setValue(final double value) throws InvalidDatatypeException;
	
	public void setValue(final float value) throws InvalidDatatypeException;
	
	public void setValue(final int value) throws InvalidDatatypeException;
	
	public void setValue(final long value) throws InvalidDatatypeException;

	public void setValue(final String value) throws InvalidDatatypeException;
}
